package com.rabbitmq.demo.mq;

import com.rabbitmq.demo.pojo.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author :wn
 * @program : demo
 * @descript :
 * @create :2021-05-08 10:42
 */
@Component
@RabbitListener(queues = "objectQueue")
public class ObjectReceiver {
    @RabbitHandler
    public void process(User user) {
        System.out.println("Receiver object : " + user);
    }
}
